package com.suo.dialog;

import com.suo.R;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class MoreDialog extends Dialog {

	private Context context;
	private android.view.View.OnClickListener onClickListener;
	private View view;
	
	private ImageView word_minus;
	private ImageView word_plus;
	public TextView word_size;
	
	public MoreDialog(Context context,android.view.View.OnClickListener onClickListener) {
		super(context);
		this.context = context;
		this.onClickListener = onClickListener;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		view = LayoutInflater.from(context).inflate(R.layout.more_dialog, null);
		setContentView(view);
        setCanceledOnTouchOutside(true);
        findView();
        setListener();
	}
	
	private void findView()
	{
		word_minus = (ImageView) view.findViewById(R.id.word_minus);
		word_plus = (ImageView) view.findViewById(R.id.word_plus);
		word_size = (TextView) view.findViewById(R.id.word_size);
	}
	
	private void setListener()
	{
		word_minus.setOnClickListener(onClickListener);
		word_plus.setOnClickListener(onClickListener);
	}
	
	public void setTextSize(int size)
	{
		word_size.setTextSize(size);
	}

}
